export const state = () => ({
  datePickerValue: "",
  gridRangeData: {},
  floorSiteData: {
    name: "",
    children: []
  },
  globalCheckData: [],
  tenancyContractData: {},
  areaType: "administrative",
  areaData: {
    areaCode: "",
    gridId: "",
    gridName: "",
    queryType: 0,
    sqCodeList: "",
    geoJson: "",
    areaType: 0,
    areaName: "",
    qjName: ""
  },
  floorData: {
    lzId: "",
    ldzl: "",
    sjytssx: "",
    bxttssx: ""
  },
  gridmanSfid: "",
  gridmanData: [], // 房管员
  zlxmData: [], //租赁项目
  zlqyData: [], //租赁企业
  jjjgData: [], // 经纪机构
  gridLastData: [], // 现行网格列表
  gridData: [], // 网格列表
  floorGridId: "", // 楼盘所属网格ID
  floorGridmanSfid: "" // 楼盘房管员sfid
});
const getters = {
  datePickerValue: state => {
    return state.datePickerValue;
  },
  gridRangeData: state => {
    return state.gridRangeData;
  },
  floorSiteData: state => {
    return state.floorSiteData;
  },
  globalCheckData: state => {
    return state.globalCheckData;
  },
  tenancyContractData: state => {
    return state.tenancyContractData;
  },
  areaType: state => {
    return state.areaType;
  },
  areaData: state => {
    return state.areaData;
  },
  floorData: state => {
    return state.floorData;
  },
  gridmanSfid: state => {
    return state.gridmanSfid;
  },
  gridmanData: state => {
    return state.gridmanData;
  },
  zlxmData: state => {
    return state.zlxmData;
  },
  zlqyData: state => {
    return state.zlqyData;
  },
  jjjgData: state => {
    return state.jjjgData;
  },
  gridLastData: state => {
    return state.gridLastData;
  },
  gridData: state => {
    return state.gridData;
  },
  floorGridId: state => {
    return state.floorGridId;
  },
  floorGridmanSfid: state => {
    return state.floorGridmanSfid;
  }
};
const mutations = {
  setDatePickerValue: (state, value) => {
    state.datePickerValue = value;
  },
  setGridRangeData: (state, value) => {
    state.gridRangeData = value;
  },
  setFloorSiteData: (state, value) => {
    state.floorSiteData = value;
  },
  setGlobalCheckData: (state, value) => {
    state.globalCheckData = value;
  },
  setTenancyContractData: (state, value) => {
    state.tenancyContractData = value;
  },
  setAreaType: (state, value) => {
    state.areaType = value;
  },
  setFloorData: (state, value) => {
    state.floorData = value;
  },
  setAreaData: (state, value) => {
    state.areaData = value;
  },
  setGridmanSfid: (state, value) => {
    state.gridmanSfid = value;
  },
  setGridmanData: (state, value) => {
    state.gridmanData = value;
  },
  setZlxmData: (state, value) => {
    state.zlxmData = value;
  },
  setZlqyData: (state, value) => {
    state.zlqyData = value;
  },
  setJjjgData: (state, value) => {
    state.jjjgData = value;
  },
  setGridLastData: (state, value) => {
    state.gridLastData = value;
  },
  setGridData: (state, value) => {
    state.gridData = value;
  },
  setFloorGridId: (state, value) => {
    state.floorGridId = value;
  },
  setFloorGridmanSfid: (state, value) => {
    state.floorGridmanSfid = value;
  }
};

export default {
  namespaced: true,
  state,
  getters,
  mutations
};
